package com.beilang.hotline.telreply.dao;

import com.beilang.base.core.dao.PaginationBaseDAO;
import com.beilang.hotline.telreply.model.TelreplyModel;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;

public class TelreplyDAO extends PaginationBaseDAO {

    public TelreplyModel createTelreplyModel(TelreplyModel telreplyModel) {
		return (TelreplyModel)this.save(telreplyModel);
	}

	public TelreplyModel saveTelreplyModel(TelreplyModel telreplyModel) {
		return (TelreplyModel)this.save(telreplyModel);
	}

	public void deleteTelreplyModel(Long replyId){
		this.remove(TelreplyModel.class, replyId);
	}

	public TelreplyModel getTelreplyModel(Long attachModelId){
		return (TelreplyModel)this.get(TelreplyModel.class, attachModelId);
	}

     protected  String mapSortField(String dataField){
    	return "";
    }

    public List searchTelreplyList(Long recordId,boolean isKeyIndicator)
    {
        Map map = new HashMap();
        map.put("recordId",recordId);
        if (isKeyIndicator)
        {
            map.put("keyIndicator","Y");
        }
        return getSqlMapClientTemplate().queryForList("searchTelReplyList", map);
    }
}
